package com.itheima.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Jt
 * @date 2021/4/7 19:04
 */
@RestController
public class FallbackController {

    /**
     * 服务降级的方法
     * @return
     */
    @RequestMapping(value = "/fallbackTest")
    public Map<String, String> fallBackController () {
        Map<String, String> response = new HashMap<>();
        response.put("code","502");
        response.put("msg","服务超时");
        return response;
    }

}
